<?php

namespace App\Library\Requests\Product;

use App\Library\Requests\Base;
use App\Library\Rules\TimesRule;

class DayTjRequest extends Base\BaseDTORequest
{
    public function rules(): array
    {
        return [
            'type' => 'nullable|integer|between:0,3',
            'times' => ['required', 'array', new TimesRule],
            'keyword' => 'nullable|string|max:255',
            'status' => 'required_if:type,3|in:0,1|boolean'
        ];
    }
}
